home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / fido / userkill.lha / UserKill.spot < prev   
Text File  |  1995-06-21  |  2KB  |  87 lines

  1. /*            -+- UserKill 1.0 by Anthony Brice -+-                   */
  2.  
  3. /*          See Doc file for information on this script               */
  4.  
  5. Address SPOT
  6. Options RESULTS
  7.  
  8. 'progressclose 1'
  9.  
  10. 'isarealist'
  11. If RC=0 then do
  12.   'requestnotify "Userkill will only run from Message List or Message window"'
  13.   Exit 0
  14.   End
  15. 'getareaname'
  16. AreaName=RESULT
  17. 'getnummsgs'
  18. TotalMessages=RESULT
  19. Message=1 ; Deleted=0
  20. 'requestresponse TITLE "UserKill 1.0 by Anthony Brice!" PROMPT "How would you like to scan ?" GADGETS "_Name|_Address|_This Poster|_Current Subject|_ABORT" center'
  21. Flag=RC
  22. Select
  23. When FLAG=1 then do
  24.   'requeststring TITLE "  + UserKill 1.0 by Anthony Brice - 2:254/255.1 +" PROMPT "Please Enter a name to remove messages from: "'
  25.   If RC~=0 then exit
  26.   Name=RESULT
  27.   UserName=Upper(Name)
  28.   End
  29. When FLAG=2 then do
  30.   'requeststring TITLE "  + UserKill 1.0 by Anthony Brice - 2:254/255.1 +" PROMPT "Please Enter an Address to remove messages from: "'  
  31.   If RC~=0 then exit
  32.   Address=RESULT
  33.   End
  34. When FLAG=3 then do
  35.   'getfrom'
  36.   Name=RESULT
  37.   UserName=Upper(Name)
  38.   End
  39. When Flag=4 then do
  40.   'getsubject'
  41.   Subject=RESULT
  42.   End
  43. Otherwise Exit 0
  44. End
  45. 'getmessagenumber'
  46. CurrentMessage=RESULT
  47. 'firstmessage'
  48. If Flag=1 | Flag=3 then 'progressopen TITLE "Deleting Messages from Name: 'Name'" PROMPT "Please Wait..."'
  49. If Flag=2 then 'progressopen TITLE "Deleting Messages from Address: 'Address'" PROMPT "Please Wait..."'
  50. If Flag=4 then 'progressopen TITLE "Deleting Messages with Subject: 'Subject'" PROMPT "Please Wait..."'
  51. Requestor=RESULT
  52. Do Until Message=TotalMessages
  53.   'nextmessage'
  54.   Message=Message+1
  55.   'getfrom'
  56.   From=Upper(RESULT)
  57.   'getfromaddress'
  58.   FromAddress=RESULT  
  59.   'getsubject'
  60.   FromSubject=RESULT
  61.   If Flag=1 | Flag=3 then do
  62.     If From=UserName then Call KillMessage
  63.     End
  64.   If Flag=2 then do
  65.     If FromAddress=Address then Call KillMessage
  66.     End
  67.   Else do
  68.     If FromSubject=Subject then Call KillMessage
  69.     End
  70.   'progressupdate' Requestor Message TotalMessages 'PROMPT "'deleted' message(s) Removed !"'
  71.   If RC>0 then Signal Done
  72.   End
  73.  
  74. Done:
  75. 'progressclose' Requestor
  76. 'requestnotify PROMPT "Area Finished. 'deleted' Messages Removed."'
  77. 'gotomessage "'CurrentMessage'"'
  78. Exit 0
  79.  
  80. KillMessage:
  81. 'deletemessage NOREQ'
  82. Deleted=Deleted+1
  83. TotalMessages=TotalMessages-1
  84. If Message<CurrentMessage then CurrentMessage=CurrentMessage-1
  85. Return
  86.  
  87.